<template>
  <div class="footer">
    <h1>我是footer</h1>
    <p>count为{{ count }}</p>
    <p>电影的个数为{{ movieList.length }}</p>
    <button @click="decrement">累减</button>
    <h1>电影分类</h1>
    <button @click="getMovieList">点击获取电影</button>
    <ul>
      <li v-for="item in movieList" :key="item.tvId">{{ item.albumName }}</li>
    </ul>
  </div>
</template>

<script>
import { mapMutations, mapState, mapActions } from "vuex";
export default {
  name: "Footer",
  computed: {
    ...mapState(["count", "movieList"]),
  },
  methods: {
    ...mapMutations(["decrement"]),
    ...mapActions(["getMovieList"]),
  },
};
</script>

<style scoped>
.footer {
  margin: 30px;
  background: yellowgreen;
}
</style>